<%@ page contentType="text/html;charset=UTF-8"%> 
<%@ include file="/WEB-INF/jsp/include/head.jsp"%>
<html>
	<head>
		<link href="<%=WEBPATH%>/styles/admin/admin.css" type="text/css"
			rel="stylesheet">
		<link href="<%=WEBPATH%>/extremecomponents/extremecomponents.css"
			type="text/css" rel="stylesheet">
		<title><fmt:message key="global.title" />
		</title> 
	</head>
	<body>
		<div id="content">
			<h1>
				<fmt:message key="resource.list" />
			</h1>
			<div style="text-align:right;">
				<c:set var="buttons">
					<input style="cursor:hand;" onclick="javascript:clickFunction('/admin/resource/edit.html');" type="button" value="<fmt:message key="button.add"/>">
				</c:set>
				<c:out value="${buttons}" escapeXml="false" />
			</div> 
			<ec:table items="resources" var="resource"
				action="/admin/resource/list.html" filterable="false">
				<ec:exportXls fileName="resourcelist.xls" tooltip="export Excel" />
				<ec:exportPdf fileName="resourcelist.pdf" tooltip="export Pdf" />
				<ec:exportCsv fileName="resourcelist.csv" tooltip="export csv" />
				<ec:row>
					<ec:column property="checkbox" title="button.choice"
						sortable="false" viewsAllowed="html">
						<input type="checkbox" name="itemlist" value="${resource.id}"
							style="border:0px"/>
					</ec:column>
					<ec:column property="rowcount" cell="rowCount"
						title="global.number" sortable="false" viewsAllowed="html" />
					<ec:column property="name" title="resource.name"></ec:column>
					<ec:column property="resType" title="resource.resType" />
					<ec:column property="edit" title="button.edit" sortable="false"
						viewsAllowed="html">
						<A href=" <%=WEBPATH%>/admin/resource/edit.html?id=${resource.id}"
							title="<fmt:message key="button.edit"/>"> <img
								src="<c:url value="/images/icon/modify.gif"/>" border="0" /> </A>
					</ec:column>
				</ec:row>
			</ec:table>
			<div style="text-align:right;">
				<c:out value="${buttons}" escapeXml="false" />
			</div>
		</div>
		<script type="text/javascript" language="javascript">
		function clickFunction(href){
			//alert(href);
			location.href=" <%=WEBPATH%>"+href;
		}
</script>
	</body>
</html>
